<template>
	<view class="flex align-center">
		<text class="w-32 h-32  check mr-2 ml-1" :class="item.checked?'checked':''" @tap="checkFn"></text>
		<view class="cart_item bgF3F5FA rounded-lg p-2 flex align-center mb-2 flex-1" @tap="navTo">
			<image class="rounded" :src="item.peipei.heading" mode="aspectFill" style="width: 176rpx;height: 176rpx;">
			</image>
			<view class="flex flex-column flex-1 ml-2">
				<view class="flex align-center">
					<text class="fs-32 text-black font-weight-light">{{item.peipei.nickname}}</text>
					<image src="/static/imgs/renzheng.png" mode="aspectFill" class="w-32 h-32 ml-1"
						v-if="item.peipei.is_verified === 1">
					</image>
					<image v-if="item.peipei.nationality && item.peipei.nationality.logo" :src="item.peipei.nationality.logo"
						mode="aspectFill" class="w-32 h-32 ml-1 rounded-circle flex-shrink"></image>
					<view class="flex align-center bgFF4CBE rounded-circle px-1 ml-1">
						<image :src="`/static/imgs/${item.peipei.gender === 2?'sex':'sex1'}.png`" mode="aspectFill"
							style="width: 20rpx;height: 20rpx;"></image>
						<text class="text-white fs-20">{{item.peipei.age}}</text>
					</view>
					<view class="flex align-center flex-1 justify-end">
						<image src="/static/imgs/hot_icon.png" mode="aspectFill" class="w-36 h-36"></image>
						<text class="ftFF685E fs-26 font-weight-light">{{abbreviateNumber(item.peipei.fire_balance)}}</text>
					</view>
				</view>
				<view class="flex align-center mt-2">
					<view class="rounded px-1 py-1 bgD5EDF8 flex align-center mr-1" v-for="(obj,index) in item.peipei.interests"
						:key="index">
						<image :src="obj.icon" mode="aspectFill" class="w-32 h-32"></image>
						<text class="ft666666 fs-22 ml-1">{{obj.name}}</text>
					</view>
				</view>
				<view class="flex align-center justify-between mt-3">
					<view class="flex align-center">
						<view class="flex align-center ftFF0073">
							<text class="fs-34 font-weight-light">{{item.peipei.price}}</text>
							<image src="/static/imgs/jinbi.png" mode="aspectFill" class="w-28 h-28 mx-1"></image>
						</view>
						<text class="fs-24 text-black letter-spacing ml-1">/ {{$t('hhh.t7')}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		abbreviateNumber
	} from '@/utils/common.js'
	export default {
		props: {
			item: {
				type: Object,
				default: () => {}
			}
		},
		data() {
			return {

			}
		},
		methods: {
			abbreviateNumber,
			checkFn() {
				this.$emit('changeCheck')
				// this.item.checked = !this.item.checked
			},
			navTo() {
				uni.navigateTo({
					url: `/pages/playerhome/playerhome?id=${this.item.peipei_id}`
				})
			}
		}
	}
</script>

<style>
</style>